<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>确认订单</title>  
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=0" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/base.css" />
<link rel="stylesheet" type="text/css" href="__PUBLIC__/Wx/css/cart.css" />
</head>
<body> 
<div class="prodetail">
	<div class="shop"><span>{$member['store']}(社区扶农店）</span></div>
    <div class="prolist">
    	<div class="pro">
            <div class="pic"><img src="<?= isMorePic($h_imgs)?>"/></div>
            <div class="name">
                <h3>{$title}</h3>
                <p><em>{$price}积分</em></p>
            </div>
        </div>
    </div>
    <div class="money02"><span>需要支付</span><b>{$price}积分</b></div>
    <div class="button02"><input type="button" value="立即申请" onClick="reload()"/></div>
    <!--<div class="tc">-->
    	<!--<div class="shadow">-->
            <!--<i class="gb">关闭</i>-->
            <!--<div class="select02">-->
                <!--<h2>温馨提示</h2>-->
                <!--<p>确认要申请吗？</p>-->
                <!--<div class="butt"><input type="button" value="确认" class="left"  onClick="window.location='__MODULE__/Foretaste/pay/gid/{$id}'"/><input type="button" value="取消"  onClick="window.location='__MODULE__/Foretaste/pro/gid/{$id}'"/></div>-->
            <!--</div>-->
   		<!--</div>-->
    <!--</div>-->
</div>
<script  src="__PUBLIC__/Wx/js/jquery.js" type="text/javascript"></script>
<script type="text/javascript">
    function reload() {
        var gid = "{$id}";
        $.post('__MODULE__/Foretaste/reload',{id:gid},function (d) {
            if (d.num > 0){
                window.location.href='__MODULE__/Foretaste/pay/gid/{$id}'
            }else{
                alert('非常抱歉，货物已售罄')
                window.location.href='__MODULE__/Foretaste/index'
            }
        })
    }
</script>
</body>
</html>